[flink] Fix Flink version detection for key-only deletes on non-release versions - #9053
Merged
JingsongLi merged 1 commit intoAug 6, 2026
Conversation
…se versions Flink builds from a release branch or master publish a two-component version plus a suffix (e.g. 2.1-SNAPSHOT, 2.2-SNAPSHOT), so splitting only on '.' left "2-SNAPSHOT" as the minor part. The NumberFormatException was swallowed and key-only deletes were silently disabled on runtimes that do have the FLIP-510 API. Split on both '.' and '-', and extract the parsing into a package-private isVersionAtLeast21(String) so it can be unit tested. Strings that resolve to Flink 2.0 or below still return false, keeping the NoSuchMethodError guard intact. Generated-by: Claude Code
Contributor
|
+1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
fix #9052
ChangelogModeUtils.isFlink21OrAbove()splitEnvironmentInformation.getVersion()on.only, leaving2-SNAPSHOTas the minor part. TheNumberFormatExceptionwas swallowed, so key-only deletes were disabled on a runtime that has the FLIP-510 API, while the log claimedrequires Flink 2.1+ (current version: 2.2-SNAPSHOT).flink-runtimeas2.1-SNAPSHOTand2.2-SNAPSHOT. Released2.1.0was never affected..and-instead. One-directional:2.0-SNAPSHOT,2.0-rc1,2.0-vvr-11.2-SNAPSHOTstill returnfalse, keeping the Flink 2.0NoSuchMethodErrorguard.E2eTestBase.safelyParseVersion()already acknowledges suffixed Flink versions.Tests
ChangelogModeUtilsTest#testVersionAtLeast21/#testVersionBelow21.mvn -pl paimon-flink/paimon-flink2-common -Pflink2 clean install— 18 tests passed.